package com.hp.easyBuy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

@TableName(value = "t_cart")
public class TCart {

  @TableId(value = "CARTID",type = IdType.AUTO) //主键自增
  private long cartid;
  @TableField(value = "USERID")
  private long userid;
  @TableField(value = "GOODSID")
  private long goodsid;
  @TableField(value = "NUM")
  private long num;

  public TCart() {
  }

  public TCart(long cartid, long userid, long goodsid, long num) {
    this.cartid = cartid;
    this.userid = userid;
    this.goodsid = goodsid;
    this.num = num;
  }

  public TCart(long userid, long goodsid, long num) {
    this.userid = userid;
    this.goodsid = goodsid;
    this.num = num;
  }

  public long getCartid() {
    return cartid;
  }

  public void setCartid(long cartid) {
    this.cartid = cartid;
  }


  public long getUserid() {
    return userid;
  }

  public void setUserid(long userid) {
    this.userid = userid;
  }


  public long getGoodsid() {
    return goodsid;
  }

  public void setGoodsid(long goodsid) {
    this.goodsid = goodsid;
  }


  public long getNum() {
    return num;
  }

  public void setNum(long num) {
    this.num = num;
  }

  @Override
  public String toString() {
    return "TCart{" +
            "cartid=" + cartid +
            ", userid=" + userid +
            ", goodsid=" + goodsid +
            ", num=" + num +
            '}';
  }
}
